<template>
	<view class="padding">
		<sea-link class="flex-row" v-for="(item, index) in linkList" :key="index" :url="item.url">
			<view class="box-body">
				<text class="text-h4" style="margin-right: 8px;">{{ item.title }}</text>
				<text class="text block">{{item.remark}}</text>
			</view>
			<uni-icons class="box-right" type="right" style="align-items: center;display: flex;"></uni-icons>
		</sea-link>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello',
				linkList: [{
						url: 'helloworld',
						title: 'HelloWorld',
						remark: 'first demo……'
					},
					{
						url: './layout',
						title: 'Layout',
						remark: '界面布局'
					},
					{
						url: './list',
						title: 'List View',
						remark: '下拉刷新，上拉加载……'
					},
					{
						url: './general',
						title: 'General',
						remark: '文本、色彩……'
					},
					{
						url: './login',
						title: 'Login',
						remark: '登录页……'
					},
					{
						url: './form',
						title: 'Form',
						remark: '表单……'
					},
					{
						url: './buttons',
						title: 'Buttons',
						remark: '各种按钮……'
					},
					{
						url: './image-picker',
						title: 'Image Picker',
						remark: '图片选择器……'
					},
					{
						url: './uploader',
						title: 'Uploader',
						remark: '文件选择器……'
					},
					{
						url: './banner',
						title: 'Banner',
						remark: '轮播图……'
					},
					{
						url: './chart',
						title: 'Chart',
						remark: '图表……'
					}
				]
			}
		},
		onLoad(option) {
			console.log(option.id); //打印出上个页面传递的参数。
			console.log(option.name); //打印出上个页面传递的参数。
		},
		methods: {
			print: function() {
				uni.navigateTo({
					url: '../demo/index'
				});
			}
		}
	}
</script>